package edu.whu.notepal.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import edu.whu.notepal.dto.NoteDTO;
import edu.whu.notepal.pojo.Note;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author 陈磊
* @description 针对表【t_note】的数据库操作Service
* @createDate 2022-11-17 09:16:40
*/
public interface NoteService extends IService<Note> {

    List<Note> getSimpleInfo(Long startIndex, Long size, LambdaQueryWrapper<Note>wrapper,boolean visibleOnly);

    void changeVisible(Long noteId,Boolean visible);

    /**
     * 查询个人标签 从0开始 size是个数 懒加载设计
     * @param startIndex
     * @param size
     * @param userId
     * @return
     */
    List<Note> getByUserId(Long userId, Long startIndex, Long size);

    List<NoteDTO> getNotesByColumnId(Long columnId, Long startIndex, Long size);

    NoteDTO getDetailsById(Long id);

    void saveWithGroup(NoteDTO noteDTO);


    Long getPublisher(Long noteId);
}